package ATM.gui;

import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.SwingConstants;

public class WithDraw extends JPanel {

	JButton wd100;
	JButton wd200;
	JButton wd500;
	JButton wd1000;
	JLabel lblBalance;
	



	Screen screen;

	public WithDraw(Screen screen) {
		this.screen = screen;
		setLayout(null);

		JLabel lblChoseAmount = new JLabel("Chose amount");
		lblChoseAmount.setBounds(183, 89, 148, 21);
		add(lblChoseAmount);

		wd100 = new JButton("100");
		wd100.setActionCommand("Withdraw100");
		wd100.addActionListener(screen.getaL());
		wd100.setBounds(183, 129, 136, 85);
		add(wd100);

		wd200 = new JButton("200");
		wd200.setActionCommand("Withdraw200");
		wd200.addActionListener(screen.getaL());
		wd200.setBounds(361, 129, 136, 85);
		add(wd200);

		wd500 = new JButton("500");
		wd500.setActionCommand("Withdraw500");
		wd500.addActionListener(screen.getaL());
		wd500.setBounds(183, 225, 136, 85);
		add(wd500);

		wd1000 = new JButton("1000");
		wd1000.setActionCommand("Withdraw1000");
		wd1000.addActionListener(screen.getaL());
		wd1000.setBounds(362, 225, 136, 85);
		add(wd1000);

		JButton btnExit = new JButton("Exit");
		btnExit.setActionCommand("Exit");
		btnExit.addActionListener(screen.getaL());
		btnExit.setBounds(502, 356, 128, 28);
		add(btnExit);
		
		lblBalance = new JLabel("Balance");
		lblBalance.setLabelFor(this);
		lblBalance.setHorizontalAlignment(SwingConstants.RIGHT);
		lblBalance.setBounds(402, 0, 228, 29);
		add(lblBalance);
		
		JLabel image = (new JLabel(screen.getVariables().getImage1() ));
		image.setBounds(0, 0, 640, 480);
		add(image);
	}
	
	public JButton getWd100() {
		return wd100;
	}

	public void setWd100(JButton wd100) {
		this.wd100 = wd100;
	}

	public JButton getWd200() {
		return wd200;
	}

	public void setWd200(JButton wd200) {
		this.wd200 = wd200;
	}

	public JButton getWd500() {
		return wd500;
	}

	public void setWd500(JButton wd500) {
		this.wd500 = wd500;
	}

	public JButton getWd1000() {
		return wd1000;
	}

	public void setWd1000(JButton wd1000) {
		this.wd1000 = wd1000;
	}

	public JLabel getLblBalance() {
		return lblBalance;
	}

	public void setLblBalance(JLabel lblBalance) {
		this.lblBalance = lblBalance;
	}
}
